package com.crm.mapper;

import com.crm.aonnation.AutoFill;
import com.crm.dto.ContractQueryPagePramDto;
import com.crm.enumeration.OperationType;
import com.crm.pojo.Contract;
import com.crm.vo.ContractVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ContractMapper {

    List<Contract> queryContractList(ContractQueryPagePramDto dto);

    /**
     * 根据合同id查询合同信息
     *
     * @param id
     * @return
     */
    Contract queryById(String id);

    /**
     * 新增
     *
     * @param contract
     */
    @AutoFill(OperationType.INSERT)
    void addContract(Contract contract);

    @Select("select * from tb_contract where id=#{id}")
    Contract getById(String id);
 @AutoFill(OperationType.UPDATE)
    void updateContract(Contract contract);
}
